<?php
require_once 'global.php';

if ($_SERVER['PATH_INFO']) {
    $data = explode("/", $_SERVER['PATH_INFO']);
    $_REQUEST['pid'] = (int)$data[1];

    if ((int)$data[2]) {
        $_REQUEST['tid'] = (int)$data[2]; // for tabid
        setcookie('tid', $_REQUEST['tid'], 0, '/');
    }
}

$tpl = 'items/itemslist.html';
if ($_GET['filter'] && $_GET['xml']) $tpl = 'xml/search.xml';
if ($_REQUEST['ajaxfilter']) $tpl = 'items/itemfilter.ajax.html';

$Controller =& getController('items');
$View = $Controller->getView('frontItemsList');
$View->display($tpl);
?>
